<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="com.qf.pojo.User" %><%--
  Created by IntelliJ IDEA.
  com.qf.pojo.User: sun
  Date: 2022/9/7
  Time: 14:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page isELIgnored="false" contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>el表达式</title>
</head>
<body>
    <%
        int i = 100;
        String s = "Hello";
        boolean b = true;
        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("d");

        Map<String,Object> map = new HashMap<>();
        map.put("one", "1");
        map.put("two", "2");
        map.put("three", "3");
        map.put("four", "4");
        map.put("five", "5");


        //pageContext  作用域：当前页面
        session.setAttribute("i", i);
        session.setAttribute("s", s);
        session.setAttribute("b", b);
        session.setAttribute("list", list);
        session.setAttribute("map", map);


        User user = new User();
        user.setId(1);
        user.setUsername("lisi");
        request.setAttribute("user", user);
    %>

    ${i + 100}
    ${i - 100}
    ${i * 100}
    ${i / 100}
    ${i == 100}
    ${i != 100}
    ${i < 100}
    ${s.concat("world")}
    ${b}
    ${list[1]}
    ${map.one}
    ${map.two}
    ${map.three}


    ${user.id}
    ${user.username}

    <%--
        EL 四个隐式的 域对象
            pageSocpe
            requestScope
            sessionScope
            applicationScope

        在EL表达式中获取域中的数据，如果没有指定域对象，则从最小作用域范围 -- 最大作用域范围依次查找

    --%>
    ${applicationScope.list}




</body>
</html>
